<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Zen Focus - 极简专注</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <!-- 主容器 -->
    <div class="app-container">
        <!-- 侧边面板 -->
        <aside class="side-panel" id="sidePanel">
            <div class="side-header">
                <button class="menu-toggle" id="menuToggle">
                    <i class="fas fa-bars"></i>
                </button>
                <div class="app-logo">
                    <i class="fas fa-leaf"></i>
                    <span>Zen Focus</span>
                </div>
            </div>

            <div class="side-content">
                <!-- 任务列表 -->
                <div class="tasks-section">
                    <div class="section-header">
                        <h2>今日任务</h2>
                        <button class="add-task-btn" id="addTaskBtn">
                            <i class="fas fa-plus"></i>
                        </button>
                    </div>
                    <div class="task-list" id="taskList">
                        <!-- 任务将通过JavaScript动态添加 -->
                    </div>
                </div>

                <!-- 白噪音控制 -->
                <div class="sounds-section">
                    <div class="section-header">
                        <h2>白噪音</h2>
                        <button class="master-volume" id="masterVolume">
                            <i class="fas fa-volume-up"></i>
                        </button>
                    </div>
                    <div class="sound-controls">
                        <div class="sound-item" data-sound="rain">
                            <button class="sound-toggle">
                                <i class="fas fa-cloud-rain"></i>
                            </button>
                            <div class="sound-slider">
                                <input type="range" min="0" max="100" value="50">
                            </div>
                        </div>
                        <div class="sound-item" data-sound="waves">
                            <button class="sound-toggle">
                                <i class="fas fa-water"></i>
                            </button>
                            <div class="sound-slider">
                                <input type="range" min="0" max="100" value="50">
                            </div>
                        </div>
                        <div class="sound-item" data-sound="cafe">
                            <button class="sound-toggle">
                                <i class="fas fa-coffee"></i>
                            </button>
                            <div class="sound-slider">
                                <input type="range" min="0" max="100" value="50">
                            </div>
                        </div>
                        <div class="sound-item" data-sound="fire">
                            <button class="sound-toggle">
                                <i class="fas fa-fire"></i>
                            </button>
                            <div class="sound-slider">
                                <input type="range" min="0" max="100" value="50">
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="side-footer">
                <button class="icon-btn" id="themeToggle">
                    <i class="fas fa-moon"></i>
                </button>
                <button class="icon-btn" id="settingsBtn">
                    <i class="fas fa-cog"></i>
                </button>
            </div>
        </aside>

        <!-- 主要内容区 -->
        <main class="main-content">
            <!-- 番茄钟计时器 -->
            <div class="timer-container">
                <div class="timer-wrapper">
                    <div class="timer-progress">
                        <svg viewBox="0 0 100 100" class="progress-ring">
                            <circle class="progress-ring-circle" cx="50" cy="50" r="45"/>
                        </svg>
                        <div class="timer-display">
                            <div class="time" id="timeDisplay">25:00</div>
                            <div class="phase" id="phaseDisplay">专注时间</div>
                        </div>
                    </div>
                    <div class="timer-controls">
                        <button class="timer-btn" id="resetTimer">
                            <i class="fas fa-redo-alt"></i>
                        </button>
                        <button class="timer-btn primary" id="startTimer">
                            <i class="fas fa-play"></i>
                        </button>
                        <button class="timer-btn" id="skipTimer">
                            <i class="fas fa-forward"></i>
                        </button>
                    </div>
                </div>
                
                <div class="focus-stats">
                    <div class="stat-item">
                        <div class="stat-value" id="todayPomodoros">0</div>
                        <div class="stat-label">今日番茄数</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value" id="totalFocusTime">0分钟</div>
                        <div class="stat-label">专注时长</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value" id="completedTasks">0/0</div>
                        <div class="stat-label">任务完成</div>
                    </div>
                </div>
            </div>

            <!-- 专注提示 -->
            <div class="focus-quote">
                <p id="quote">"专注是一种练习，每一刻都是新的开始。"</p>
            </div>
        </main>
    </div>

    <!-- 任务编辑对话框 -->
    <div class="modal" id="taskModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>新建任务</h3>
                <button class="close-modal">&times;</button>
            </div>
            <div class="modal-body">
                <form id="taskForm">
                    <div class="form-group">
                        <label for="taskTitle">任务名称</label>
                        <input type="text" id="taskTitle" required>
                    </div>
                    <div class="form-row">
                        <div class="form-group">
                            <label for="taskPomodoros">预计番茄数</label>
                            <input type="number" id="taskPomodoros" min="1" value="1">
                        </div>
                        <div class="form-group">
                            <label for="taskPriority">优先级</label>
                            <select id="taskPriority">
                                <option value="low">低</option>
                                <option value="medium" selected>中</option>
                                <option value="high">高</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="taskNotes">备注</label>
                        <textarea id="taskNotes" rows="3"></textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn secondary close-modal">取消</button>
                <button class="btn primary" id="saveTaskBtn">保存</button>
            </div>
        </div>
    </div>

    <!-- 设置对话框 -->
    <div class="modal" id="settingsModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3>设置</h3>
                <button class="close-modal">&times;</button>
            </div>
            <div class="modal-body">
                <div class="settings-section">
                    <h4>时间设置</h4>
                    <div class="form-group">
                        <label for="workDuration">专注时长（分钟）</label>
                        <input type="number" id="workDuration" value="25" min="1">
                    </div>
                    <div class="form-group">
                        <label for="breakDuration">休息时长（分钟）</label>
                        <input type="number" id="breakDuration" value="5" min="1">
                    </div>
                </div>
                <div class="settings-section">
                    <h4>提醒设置</h4>
                    <div class="form-group">
                        <label class="checkbox-label">
                            <input type="checkbox" id="soundNotification" checked>
                            声音提醒
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="checkbox-label">
                            <input type="checkbox" id="desktopNotification" checked>
                            桌面通知
                        </label>
                    </div>
                </div>
                <div class="settings-section">
                    <h4>自动化</h4>
                    <div class="form-group">
                        <label class="checkbox-label">
                            <input type="checkbox" id="autoStartBreak">
                            自动开始休息
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="checkbox-label">
                            <input type="checkbox" id="autoStartWork">
                            自动开始下一个工作时段
                        </label>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn secondary close-modal">取消</button>
                <button class="btn primary" id="saveSettingsBtn">保存</button>
            </div>
        </div>
    </div>

    <script src="js/main.js" type="module"></script>
</body>
</html>
